$(function () {
        function change() {
            let height = $(window).outerHeight()
            let mainHeight = height -60-15
            let iframe =  $("[name='mainFrame']")
            iframe.height(mainHeight)

        }
        change()
    console.log($(".logout").contents().find('a'),11111)
        $("#logout").click(function () {
            console.log(1)
            let userName = sessionStorage.getItem("userName")
            if(userName!=null) {
                sessionStorage.clear()
                $(this).empty().append('登录').attr('href','/pages/user/login.html?target=mainFrame')
                $(this).prev().empty().append('请')
            } else {
              $(this).attr('href','/pages/user/login.html?target=mainFrame')
            }

        })
})